package com.znsd.zl.house.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.znsd.zl.house.dao.HistoryDao;
import com.znsd.zl.house.entity.HistoryEntity;
import com.znsd.zl.house.service.IHistoryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName HistoryServiceImpl
 * @Description 描述
 * @author 朱彬
 * @date 2020-08-25 08:43:25
 * @Version v1.0
 */
@Service
public class HistoryServiceImpl extends ServiceImpl<HistoryDao, HistoryEntity> implements IHistoryService {

	@Override
	public List<HistoryEntity> findByIp(String ip){
		QueryWrapper qw = new QueryWrapper<>();
		qw.eq("ip",ip);
		return this.baseMapper.selectList(qw);
	}

	@Override
	public List<HistoryEntity> findByHistory(String queryHistory) {
		QueryWrapper qw = new QueryWrapper<>();
		qw.eq("query_history",queryHistory);
		return this.baseMapper.selectList(qw);
	}
}
